Draft Draft2Sketch/ru

Draft Draft2Sketch

Расположение в меню
Черчение → Преобразовать в эскиз
Верстаки
Draft, Arch
Быстрые клавиши
Нет
Представлено в версии
-
См. также
Sketcher, PartDesign

Description

Описание

Этот инструмент преобразует Draft objects в Sketcher objects и наоборот.

Usage

Использование

  1. Выберите черновик или эскиз
  2. Нажмите кнопку Draft Draft2Sketch

Notes

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To convert objects to a sketch use the make_sketch method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makeSketch method.

sketch = make_sketch(objects_list, autoconstraints=False, addTo=None, delete=False, name="Sketch", radiusPrecision=-1, tol=1e-3)

To convert a sketch to Draft objects use the draftify method of the Draft module.

draftify(objectslist, makeblock=False, delete=True)

Example:

import FreeCAD as App
import Draft

doc = App.newDocument()

rectangle = Draft.make_rectangle(2000, 1000)
circle = Draft.make_circle(500)
doc.recompute()

sketch_from_draft = Draft.make_sketch([rectangle, circle], autoconstraints=True, delete=False, radiusPrecision=0)
doc.recompute()

draft_from_sketch = Draft.draftify(sketch_from_draft, delete=False)
doc.recompute()